<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:p="http://primefaces.org/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:fhj="http://java.sun.com/jsf/composite/fhj"
        template="/resources/templates/template.xhtml">
        <ui:param name="pageTitle" value="Add Community" />
        <ui:define name="content">

		<h:form id="register">
		<h:panelGrid columns="3" id="community">

			<h:outputLabel for="name" value="Name:" />
			<p:inputText id="name" value="#{newCommunity.name}" />
			<p:message for="name" />

			<h:outputLabel for="topic" value="Topic:" />
			<p:inputText id="topic" value="#{newCommunity.topic}" />
			<p:message for="topic" />

			<h:outputLabel for="description" value="Description:" />
			<p:inputTextarea id="description" value="#{newCommunity.description}" />
			<p:message for="description" />
		<div>
			<p:commandButton id="create"
				actionListener="#{communityBean.register}" value="Register"
				update="community" styleClass="ui-priority-primary" />
			<p:message for="create" />
		</div>
		</h:panelGrid>

	</h:form>

        </ui:define>
</ui:composition>